Skip to content

Add a timeout override to get_charge_point_energy_meter_reading - #128

Merged
hardbyte merged 1 commit into
hardbyte:mainfrom
Dave-Agent:fix-energy-meter-reading-timeout
Aug 24, 2026
Merged

hardbyte merged 1 commit into
hardbyte:mainfrom
Dave-Agent:fix-energy-meter-reading-timeout

Conversation

@Dave-Agent

Copy link
Copy Markdown
Contributor

The default httpx timeout is too short for this command's round trip to the physical charger. On an ONLINE, idle E2 with a CT clamp installed, a call raised ReadTimeout (treated as offline) under the default timeout, then succeeded in ~15-20s once given timeout=30.

Adds an optional timeout parameter, defaulting to 30s, matching the existing pattern in get_charge_point_override. No behavior change for callers that already pass a timeout or for fast responses; only widens the window before treating the charger as offline.

Related to #109.

The default httpx timeout is too short for this command's round trip
to the physical charger. On an ONLINE, idle E2 with a CT clamp
installed, a call raised ReadTimeout (treated as offline) under the
default timeout, then succeeded in ~15-20s once given timeout=30.

Adds an optional timeout parameter, defaulting to 30s, matching the
existing pattern in get_charge_point_override. No behavior change for
callers that already pass a timeout or for fast responses; only
widens the window before treating the charger as offline.

Related to hardbyte#109.
@mergify

mergify Bot commented Aug 24, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@hardbyte
hardbyte merged commit 4358cca into hardbyte:main Aug 24, 2026
2 checks passed
Dave-Agent added a commit to Dave-Agent/python-evnex that referenced this pull request Aug 25, 2026
Add a timeout override to get_charge_point_energy_meter_reading (hardbyte#128)
@Simonfitzgerald

Copy link
Copy Markdown

I am not sure if it related but I am getting timeouts connecting which is setting off a thread leak in Home Assistant eventually crashing it. I have opened an issue in HA-Evnex but given the underlying connectivity looks like it is handled here, this might be a better place for the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants